From cbed226d729bbd4e5cee22bd946c849038fe3d57 Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Thu, 9 Feb 2006 16:09:00 +0100 Subject: [PATCH] Do_softirq is invoked at the path of ia64_leave_kernel instead of being invoking in function irq_exit, which is aligned with XEN/X86 and avoids __enter_schedule being reentered. Signed-off-by Anthony Xu --- xen/arch/ia64/linux-xen/entry.S | 6 +++++- xen/arch/ia64/xen/xenirq.c | 14 +++++++++----- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/xen/arch/ia64/linux-xen/entry.S b/xen/arch/ia64/linux-xen/entry.S index 9a1775fcf6..d0c9cd1482 100644 --- a/xen/arch/ia64/linux-xen/entry.S +++ b/xen/arch/ia64/linux-xen/entry.S @@ -895,6 +895,10 @@ GLOBAL_ENTRY(ia64_leave_kernel) #endif .work_processed_kernel: #ifdef XEN +(pUStk) ssm psr.i +(pUStk) br.call.sptk.many b0=process_soft_irq +(pUStk) rsm psr.i + ;; alloc loc0=ar.pfs,0,1,1,0 adds out0=16,r12 adds r7 = PT(EML_UNAT)+16,r12 @@ -907,7 +911,7 @@ leave_kernel_self: (p8) br.sptk.few leave_kernel_self ;; #endif -(p6) br.call.sptk.many b0=deliver_pending_interrupt +(pUStk) br.call.sptk.many b0=deliver_pending_interrupt ;; mov ar.pfs=loc0 mov ar.unat=r7 /* load eml_unat */ diff --git a/xen/arch/ia64/xen/xenirq.c b/xen/arch/ia64/xen/xenirq.c index 283fe40a9f..e40daeb832 100644 --- a/xen/arch/ia64/xen/xenirq.c +++ b/xen/arch/ia64/xen/xenirq.c @@ -61,16 +61,20 @@ xen_do_IRQ(ia64_vector vector) */ void xen_irq_exit(struct pt_regs *regs) { - //account_system_vtime(current); sub_preempt_count(IRQ_EXIT_OFFSET); - if((((char *)regs) -(char *) current) != (IA64_STK_OFFSET-IA64_PT_REGS_SIZE)) - return; +} - if (!in_interrupt()&&local_softirq_pending()) { +/* + * ONLY gets called from ia64_leave_kernel + * ONLY call with interrupts enabled + */ +void process_soft_irq() +{ + if (!in_interrupt() && local_softirq_pending()) { add_preempt_count(SOFTIRQ_OFFSET); do_softirq(); sub_preempt_count(SOFTIRQ_OFFSET); } - //preempt_enable_no_resched(); } + /* end from linux/kernel/softirq.c */ -- 2.30.2